<template>
  <div class="top-tools">
    <div class="tools-left"></div>

    <div class="tools-block">
      <div class="tools-item text-btn" @click="changeScreenType('PC')">PC</div>
      <div class="tools-item text-btn" @click="changeScreenType('phone')">手机</div>
    </div>
    <div class="tools-block">
      <div class="tools-item text-btn" @click="fcDesigner.model.clearFormData">清空表单</div>
    </div>
    <div class="tools-block">
      <div class="tools-item text-btn">表单设置</div>
      <div class="tools-item text-btn">页面属性</div>
    </div>
  </div>
</template>

<script lang="ts">
export default defineComponent({ name: 'CompTopTools' })
</script>
<script setup lang="ts">
import { defineComponent } from 'vue'
import { useFcDesigner } from '../hooks/FcDesigner'

const fcDesigner = useFcDesigner()
const changeScreenType = fcDesigner.model.changeScreenType
</script>

<style lang="scss" scoped>
@import '../styles.scss';
.top-tools {
  display: flex;
  align-items: center;
  background-color: $d-bg-color;
  color: rgba(0, 0, 0, 0.5);
  font-size: 12px;
  width: 100%;
  height: 36px;
  .tools-left {
    flex: 1;
  }
  .tools-block {
    display: flex;
    align-items: center;
    border-left: 1px solid $base-border-color;
    padding: 0 8px;
    .tools-item {
      padding: 0 8px;
      cursor: pointer;
      &:hover {
        color: $base-active-color;
      }
    }
  }
}
</style>
